package com.pig4cloud.pigx.pay.utils;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 支付附加擦书枚举
 * @author Jin
 * @date 2023-10-08
 * <p>
 * 支付附加参数  channelId, tenantId
 */
@Getter
@AllArgsConstructor
public enum ExtraParamsEnum {

	/**
	 *
	 */
	CHANNEL_ID("channelId", "渠道ID"),

	TENANT_ID("tenantId", "租户ID"),

	;

	/**
	 * 名称
	 */
	@Getter
	private String name;

	/**
	 * 描述
	 */
	private String description;


	private static ExtraParamsEnum[] all = ExtraParamsEnum.values();

	/**
	 * 获取参数
	 * @param name 名称
	 * @return
	 */
	public static Enum getParam(String name) {
		for(ExtraParamsEnum one : all){
			if(one.getName().equals(name))
				return one;
		}
		return null;
	}

}
